package com.yc;

/**
 * @author LC
 */
public enum R_Code {

        /**
         * R_OK  成功返回
         */
        R_OK(200, "成功"),
        /**
         * R_ERROR  失败返回
         */
        R_ERROR(500, "失败"),
        /**
         * R_AUTH_FAIL  认证失败
         */
        R_AUTH_FAIL(401, "认证失败"),
        /**
         * R_QUERY_FAIL  查询失败
         */
        R_QUERY_FAIL(1000, "查询失败"),
        /**
         * R_UPDATE_FAIL  更新失败
         */
        R_UPDATE_FAIL(2000, "更新失败"),
        /**
         * R_DELETE_FAIL  删除失败
         */
        R_DELETE_FAIL(4000, "删除失败"),
        /**
         * R_ADD_FAIL  添加失败
         */
        R_ADD_FAIL(5000, "添加失败"),
        /**
         * R_NULL_DATA_FAIL  无数据
         */
        R_NULL_DATA_FAIL(6000, "无数据"),
        /**
         * R_AUTH_FAIL  参数绑定错误
         */
        R_PARAM_FAIL(400, "参数绑定错误");

        R_Code(int code, String message) {
            this.code = code;
            this.message = message;
        }

        private int code;
        private String message;

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }

}